home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / src / term.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-08  |  5.8 KB  |  138 lines

  1. /* vi:set ts=8 sts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved    by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * This file contains the machine dependent escape sequences that the editor
  11.  * needs to perform various operations. Some of the sequences here are
  12.  * optional. Anything not available should be indicated by a null string. In
  13.  * the case of insert/delete line sequences, the editor checks the capability
  14.  * and works around the deficiency, if necessary.
  15.  */
  16.  
  17. #if defined(SASC) && SASC < 658
  18. /*
  19.  * The SAS C compiler has a bug that makes typedefs being forgot in include
  20.  * files.  Has been fixed in version 6.58.
  21.  */
  22. typedef unsigned char char_u;
  23. #endif
  24.  
  25. /*
  26.  * Index of the termcap codes in the term_strings array.
  27.  */
  28. enum SpecialKey
  29. {
  30.     KS_NAME = 0,/* name of this terminal entry */
  31.     KS_CE,    /* clear to end of line */
  32.     KS_AL,    /* add new blank line */
  33.     KS_CAL,    /* add number of blank lines */
  34.     KS_DL,    /* delete line */
  35.     KS_CDL,    /* delete number of lines */
  36.     KS_CS,    /* scroll region */
  37.     KS_CL,    /* clear screen */
  38.     KS_CD,    /* clear to end of display */
  39.     KS_DA,    /* text may be scrolled down from up */
  40.     KS_DB,    /* text may be scrolled up from down */
  41.     KS_VI,    /* cursor invisible */
  42.     KS_VE,    /* cursor visible */
  43.     KS_VS,    /* cursor very visible */
  44.     KS_ME,    /* normal mode */
  45.     KS_MR,    /* reverse mode */
  46.     KS_MD,    /* bold mode */
  47.     KS_SE,    /* normal mode */
  48.     KS_SO,    /* standout mode */
  49.     KS_CZH,    /* italic mode start */
  50.     KS_CZR,    /* italic mode end */
  51.     KS_UE,    /* exit underscore mode */
  52.     KS_US,    /* underscore mode */
  53.     KS_MS,    /* save to move cur in reverse mode */
  54.     KS_CM,    /* cursor motion */
  55.     KS_SR,    /* scroll reverse (backward) */
  56.     KS_CRI,    /* cursor number of chars right */
  57.     KS_VB,    /* visual bell */
  58.     KS_KS,    /* put term in "keypad transmit" mode */
  59.     KS_KE,    /* out of "keypad transmit" mode */
  60.     KS_TI,    /* put terminal in termcap mode */
  61.     KS_TE,    /* out of termcap mode */
  62.     KS_BC,    /* backspace character (cursor left) */
  63.     KS_CCS,    /* cur is relative to scroll region */
  64.     KS_CCO,    /* number of colors */
  65.     KS_CSF,    /* set foreground color */
  66.     KS_CSB,    /* set background color */
  67.     KS_XS,    /* standout not erased by overwriting (hpterm) */
  68.     KS_MB,    /* blink mode */
  69.     KS_CAF,    /* set foreground color (ANSI) */
  70.     KS_CAB,    /* set background color (ANSI) */
  71.     KS_LE,    /* cursor left (mostly backspace) */
  72.     KS_ND,    /* cursor right */
  73.     KS_OP    /* original color pair */
  74. };
  75.  
  76. #define KS_LAST        KS_OP
  77.  
  78. /*
  79.  * the terminal capabilities are stored in this array
  80.  * IMPORTANT: When making changes, note the following:
  81.  * - there should be an entry for each code in the builtin termcaps
  82.  * - there should be an option for each code in option.c
  83.  * - there should be code in term.c to obtain the value from the termcap
  84.  */
  85.  
  86. extern char_u *(term_strings[]);    /* current terminal strings */
  87.  
  88. /*
  89.  * strings used for terminal
  90.  */
  91. #define T_NAME    (term_strings[KS_NAME])    /* terminal name */
  92. #define T_CE    (term_strings[KS_CE])    /* clear to end of line */
  93. #define T_AL    (term_strings[KS_AL])    /* add new blank line */
  94. #define T_CAL    (term_strings[KS_CAL])    /* add number of blank lines */
  95. #define T_DL    (term_strings[KS_DL])    /* delete line */
  96. #define T_CDL    (term_strings[KS_CDL])    /* delete number of lines */
  97. #define T_CS    (term_strings[KS_CS])    /* scroll region */
  98. #define T_CL    (term_strings[KS_CL])    /* clear screen */
  99. #define T_CD    (term_strings[KS_CD])    /* clear to end of display */
  100. #define T_DA    (term_strings[KS_DA])    /* text may be scrolled down from up */
  101. #define T_DB    (term_strings[KS_DB])    /* text may be scrolled up from down */
  102. #define T_VI    (term_strings[KS_VI])    /* cursor invisible */
  103. #define T_VE    (term_strings[KS_VE])    /* cursor visible */
  104. #define T_VS    (term_strings[KS_VS])    /* cursor very visible */
  105. #define T_ME    (term_strings[KS_ME])    /* normal mode */
  106. #define T_MR    (term_strings[KS_MR])    /* reverse mode */
  107. #define T_MD    (term_strings[KS_MD])    /* bold mode */
  108. #define T_SE    (term_strings[KS_SE])    /* normal mode */
  109. #define T_SO    (term_strings[KS_SO])    /* standout mode */
  110. #define T_CZH    (term_strings[KS_CZH])    /* italic mode start */
  111. #define T_CZR    (term_strings[KS_CZR])    /* italic mode end */
  112. #define T_UE    (term_strings[KS_UE])    /* exit underscore mode */
  113. #define T_US    (term_strings[KS_US])    /* underscore mode */
  114. #define T_MS    (term_strings[KS_MS])    /* save to move cur in reverse mode */
  115. #define T_CM    (term_strings[KS_CM])    /* cursor motion */
  116. #define T_SR    (term_strings[KS_SR])    /* scroll reverse (backward) */
  117. #define T_CRI    (term_strings[KS_CRI])    /* cursor number of chars right */
  118. #define T_VB    (term_strings[KS_VB])    /* visual bell */
  119. #define T_KS    (term_strings[KS_KS])    /* put term in "keypad transmit" mode */
  120. #define T_KE    (term_strings[KS_KE])    /* out of "keypad transmit" mode */
  121. #define T_TI    (term_strings[KS_TI])    /* put terminal in termcap mode */
  122. #define T_TE    (term_strings[KS_TE])    /* out of termcap mode */
  123. #define T_BC    (term_strings[KS_BC])    /* backspace character */
  124. #define T_CCS    (term_strings[KS_CCS])    /* cur is relative to scroll region */
  125. #define T_CCO    (term_strings[KS_CCO])    /* number of colors */
  126. #define T_CSF    (term_strings[KS_CSF])    /* set foreground color */
  127. #define T_CSB    (term_strings[KS_CSB])    /* set background color */
  128. #define T_XS    (term_strings[KS_XS])    /* standout not erased by overwriting */
  129. #define T_MB    (term_strings[KS_MB])    /* blink mode */
  130. #define T_CAF    (term_strings[KS_CAF])    /* set foreground color (ANSI) */
  131. #define T_CAB    (term_strings[KS_CAB])    /* set background color (ANSI) */
  132. #define T_LE    (term_strings[KS_LE])    /* cursor left */
  133. #define T_ND    (term_strings[KS_ND])    /* cursor right */
  134. #define T_OP    (term_strings[KS_OP])    /* original color pair */
  135.  
  136. #define TMODE_COOK  0        /* terminal mode for external cmds and Ex mode */
  137. #define TMODE_RAW   1        /* terminal mode for Normal and Insert mode */
  138.